package gof23.behavior.observer;

public class Client {

	public static void main(String[] args) {
		Driver driver1 = new Driver("driver1");
		Driver driver2 = new Driver("driver2");
		
		SignalLight signalLight = new SignalLight();
		
		signalLight.registerObserver(driver1);
		signalLight.registerObserver(driver2);
		
		signalLight.setMessage("红灯");
		signalLight.setMessage("绿灯");
	}
}
